import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_base/model/routeModel.dart';
import 'package:flutter_base/routes/routes.dart';

class FristPage extends StatefulWidget {
  const FristPage({super.key});

  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _FristPageState();
  }
}

class _FristPageState extends State<FristPage> {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: const Text('Frist Page'),
      ),
      body: const Text('第一个界面'),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          // 跳转另外一个界面
          Navigator.pushNamed(context, RoutePages.secondPageRoute,
              arguments: RouteModel(data: {'1': '2', '3': '4'}, code: 200));
        },
        child: Icon(Icons.add),
      ),
    );
  }
}
